package com.quicksignin.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by GHD on 2018/9/28.
 */
@RestController
public class IpAddrController {

    @RequestMapping(value = "/",method = RequestMethod.GET)
    public String getIpAddr(final HttpServletRequest request)throws Exception {
        String ip = request.getRemoteAddr();
        System.out.println(ip);
        return ip;
    }

}
